Vue.component('purchaseHeader',{
    props:["isnav","number"],
    template: '<div :class="{navFixed:isnav==1}">' +
    '     <header class="index-header" :class="{navFixed:isnav==2}">\n' +
    '        <a class="purchase-lista" href="/purchase/goodsClassify"></a>\n' +
    '        <div class="header-search">\n' +
    '            <span class="purchase-sear">请输入商品名称</span>\n' +
    '        </div>\n' +
    '        <span class="purchase-more1"></span>\n' +
    '    </header>\n' +
    '    <nav class="index-nav clearfix">\n' +
    '        <a href="/purchase" :class="{active:number==1}">推荐</a>\n' +
    '        <a href="/purchase/newProduct" :class="{active:number==2}">新品</a>\n' +
    '        <a href="" :class="{active:number==3}">众筹</a>\n' +
    '        <a :class="{active:number==4}">保险</a>\n' +
    '        <a :class="{active:number==5}">积分贷</a>\n' +
    '    </nav></div>',
    data: function () {
        return {
        }
    },
    watch:{

    },
    mounted:function(){
    },
    methods:{
        bgimg:function(url){
            url = url?url:"";
            return {
                "background-image":'url("'+url+'"),url("")'
            }
        }
    }
});